package com.ruoyi.project.cha.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.project.cha.domain.HosSal;
import com.ruoyi.project.cha.mapper.HosSalMapper;
import com.ruoyi.project.cha.service.IHosSalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 退费查询Service业务层处理
 * 
 * @author zhuxinbo
 * @date 2021-03-24
 */
@Service
public class HosSalServiceImpl implements IHosSalService
{
    @Autowired
    private HosSalMapper hosSalMapper;

    /**
     * 查询退费查询
     * 
     * @param inqReg 退费查询ID
     * @return 退费查询
     */
    @Override
    public HosSal selectHosSalById(Long inqReg)
    {
        return hosSalMapper.selectHosSalById(inqReg);
    }

    /**
     * 查询退费查询列表
     * 
     * @param hosSal 退费查询
     * @return 退费查询
     */
    @Override
    public List< HosSal > selectHosSalList(HosSal hosSal)
    {
        return hosSalMapper.selectHosSalList(hosSal);
    }

    /**
     * 新增退费查询
     * 
     * @param hosSal 退费查询
     * @return 结果
     */
    @Override
    public int insertHosSal(HosSal hosSal)
    {
        hosSal.setCreateTime( DateUtils.getNowDate());
        return hosSalMapper.insertHosSal(hosSal);
    }

    /**
     * 修改退费查询
     * 
     * @param hosSal 退费查询
     * @return 结果
     */
    @Override
    public int updateHosSal(HosSal hosSal)
    {
        hosSal.setUpdateTime( DateUtils.getNowDate());
        return hosSalMapper.updateHosSal(hosSal);
    }

    /**
     * 批量删除退费查询
     * 
     * @param inqRegs 需要删除的退费查询ID
     * @return 结果
     */
    @Override
    public int deleteHosSalByIds(Long[] inqRegs)
    {
        return hosSalMapper.deleteHosSalByIds(inqRegs);
    }

    /**
     * 删除退费查询信息
     * 
     * @param inqReg 退费查询ID
     * @return 结果
     */
    @Override
    public int deleteHosSalById(Long inqReg)
    {
        return hosSalMapper.deleteHosSalById(inqReg);
    }
}
